﻿<%@ Page Title="" Language="C#" MasterPageFile="~/AdministratorHA/Master.Master" AutoEventWireup="true" CodeBehind="frmDonViTinh.aspx.cs" Inherits="WebComputers.AdministratorHA.frmDonViTinh" %>

<%--<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>--%>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="page-heading">
        <h1>Đơn Vị Tính</h1>
    </div>

    <table border="0" style="width:100%;" id="content-table">
        <tr>
            <th rowspan="3" class="sized">
                <img src="images/shared/side_shadowleft.jpg" width="20" height="300" alt="" /></th>
            <th class="topleft"></th>
            <td id="tbl-border-top">&nbsp;</td>
            <th class="topright"></th>
            <th rowspan="3" class="sized">
                <img src="images/shared/side_shadowright.jpg" width="20" height="300" alt="" /></th>
        </tr>
        <tr>
            <td id="tbl-border-left"></td>
            <td>
                <!--  start content-table-inner ...................................................................... START -->
                <div id="content-table-inner">

                    <!--  start table-content  -->
                    <div id="table-content">
                        
                        <table border="0" id="id-form">
                            
                            <tr>
                                <th style="vertical-align:top;">
                                    <asp:Label runat="server" Text="Tên Đơn Vị Tính :"></asp:Label>
                                </th>
                                <td>
                                    <asp:TextBox ID="txtTenDonViTinh" runat="server" CssClass="input-short input-left"></asp:TextBox>                                    
                                    <asp:RequiredFieldValidator CssClass="error-left" ID="vldTenDonViTinh_left" runat="server" ErrorMessage="" ControlToValidate="txtTenDonViTinh"></asp:RequiredFieldValidator>
                                    <asp:RequiredFieldValidator CssClass="error-inner" ID="vldTenDonViTinh" runat="server" ErrorMessage="This field is required." ControlToValidate="txtTenDonViTinh"></asp:RequiredFieldValidator>                                    
                                </td>
                            </tr>
                            
                            <tr>
                                <th></th>
                                <td>
                                    <asp:HiddenField ID="hdfID" runat="server" Value="-1" />                                    
                                </td>
                            </tr>

                            <tr>
                                <th style="vertical-align:top;">&nbsp;</th>
                                <td>
                                    <asp:Button runat="server" ID="btnLuu" Text="Lưu" CssClass="btn btn-success" OnClick="btnLuu_Click" />
                                    <input type="button" id="btnXoa" value="Xóa" class="btn btn-warning" onclick="ResetAllField();" />
                                    <input type="button" id="btnHuy" value="Hủy bỏ" class="btn btn-danger" onclick="ResetAllField();" />
                                    <%--<asp:Button runat="server" ID="btnXoa" Text="Xóa" CssClass="btn btn-warning" />
                                    <asp:Button runat="server" ID="btnHuy" Text="Hủy bỏ" CssClass="btn btn-danger" />--%>
                                </td>
                            </tr>
                        </table>

                        <div class="grid_12" style="width: 100%; margin: 0px;">


                            <div class="bottom-spacing">

                                <!-- Button -->
                                <div class="float-right">
                                    <a href="#" class="button" onclick="return false;">
                                        <span>Thêm mới<img src="images/plus-small.gif" width="12" height="9" alt="New article" /></span>
                                    </a>
                                    <%--<button id="btnAddNew" class="btn" style="margin:0;">
                                        Thêm mới<img src="images/add-16.png" alt="New article"/>
                                    </button>--%>
                                </div>

                                <!-- Table records filtering -->
                                Filter: 
                                        <select class="input-short">
                                            <option value="1" selected="selected">Select filter</option>
                                            <option value="2">Created last week</option>
                                            <option value="3">Created last month</option>
                                            <option value="4">Edited last week</option>
                                            <option value="5">Edited last month</option>
                                        </select>

                            </div>


                            <!-- Example table -->
                            <div class="module">
                                <h2><span>Bảng Đơn Vị Tính</span></h2>

                                <div class="module-table-body">
                                    <asp:GridView ID="grvDonViTinh" runat="server" CssClass="tablesorter" AutoGenerateColumns="False" CellSpacing="-1" GridLines="None" DataKeyNames="iDonViTinh_ID" OnRowDeleting="grvDonViTinh_RowDeleting" OnSelectedIndexChanging="grvDonViTinh_SelectedIndexChanging">
                                        <Columns>
                                            <asp:BoundField DataField="STT" HeaderText="STT" />
                                            <asp:BoundField DataField="iDonViTinh_ID" HeaderText="Mã Đơn Vị Tính" />
                                            <asp:BoundField DataField="sTenDonViTinh" HeaderText="Tên Đơn Vị Tính" />
                                            <asp:CommandField ButtonType="Image" DeleteImageUrl="~/AdministratorHA/images/bin.gif" DeleteText="Xóa" HeaderText="Thao Tác" SelectImageUrl="~/AdministratorHA/images/pencil.gif" SelectText="Sửa" ShowDeleteButton="True" ShowSelectButton="True" />
                                        </Columns>
                                    </asp:GridView>
                                                                            
                                    
                                    <div class="pager" id="pager">                                        
                                            <div>                                              
                                                <asp:ImageButton ID="btnFirst" runat="server" ImageUrl="images/arrow-stop-180.gif" AlternateText="First" CssClass="first" CommandName="First" OnCommand="ChangePage" CausesValidation="False" />
                                                <asp:ImageButton ID="btnPrev" runat="server" ImageUrl="images/arrow-180.gif" AlternateText="Prev" CssClass="prev" CommandName="Prev" OnCommand="ChangePage" CausesValidation="False" />

                                                <asp:TextBox ID="txtPageIndex" runat="server" CssClass="pagedisplay input-short align-center" Width="20" Text="1" AutoPostBack="True" OnTextChanged="txtPageIndex_TextChanged"></asp:TextBox>
                                                <asp:Label runat="server" Text="of" Font-Size="Medium"></asp:Label>
                                                <asp:TextBox ID="txtTotalPages" runat="server" CssClass="pagedisplay input-short align-center" Width="20" Text="0" ReadOnly="true"></asp:TextBox>

                                                <asp:ImageButton ID="btnNext" runat="server" ImageUrl="images/arrow.gif" AlternateText="Next" CssClass="next" CommandName="Next" OnCommand="ChangePage" CausesValidation="False" />
                                                <asp:ImageButton ID="btnLast" runat="server" ImageUrl="images/arrow-stop.gif" AlternateText="Last" CssClass="last" CommandName="Last" OnCommand="ChangePage" CausesValidation="False" />
                                                <asp:DropDownList ID="ddlPageSize" runat="server" CssClass="pagesize input-short align-center" AutoPostBack="True" OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged"></asp:DropDownList>
                                                <asp:HiddenField ID="hdfPageSize" runat="server" />
                                            </div>                                        
                                    </div>
                                    <div class="table-apply">
                                        
                                            <div>
                                                <span>Apply action to selected:</span>
                                                <select class="input-medium">
                                                    <option value="1" selected="selected">Select action</option>
                                                    <option value="2">Publish</option>
                                                    <option value="3">Unpublish</option>
                                                    <option value="4">Delete</option>
                                                </select>
                                            </div>
                                        
                                    </div>
                                    <div style="clear: both"></div>
                                </div>
                                <!-- End .module-table-body -->
                            </div>
                            <!-- End .module -->
                            
                            <%--<div class="pagination">
                                <a href="#" class="button"><span>
                                    <img src="images/arrow-stop-180-small.gif" tppabs="http://www.xooom.pl/work/magicadmin/images/arrow-stop-180-small.gif" height="9" width="12" alt="First" />
                                    First</span></a>
                                <a href="#" class="button"><span>
                                    <img src="images/arrow-180-small.gif" tppabs="http://www.xooom.pl/work/magicadmin/images/arrow-180-small.gif" height="9" width="12" alt="Previous" />
                                    Prev</span></a>
                                <div class="numbers">
                                    <span>Page:</span>
                                    <a href="#">1</a>
                                    <span>|</span>
                                    <a href="#">2</a>
                                    <span>|</span>
                                    <span class="current">3</span>
                                    <span>|</span>
                                    <a href="#">4</a>
                                    <span>|</span>
                                    <a href="#">5</a>
                                    <span>|</span>
                                    <a href="#">6</a>
                                    <span>|</span>
                                    <a href="#">7</a>
                                    <span>|</span>
                                    <span>...</span>
                                    <span>|</span>
                                    <a href="#">99</a>
                                </div>
                                <a href="#" class="button"><span>Next
                                            <img src="images/arrow-000-small.gif" tppabs="http://www.xooom.pl/work/magicadmin/images/arrow-000-small.gif" height="9" width="12" alt="Next" /></span></a>
                                <a href="#" class="button last"><span>Last
                                            <img src="images/arrow-stop-000-small.gif" tppabs="http://www.xooom.pl/work/magicadmin/images/arrow-stop-000-small.gif" height="9" width="12" alt="Last" /></span></a>
                                <div style="clear: both;"></div>
                            </div>--%>

                        </div>
                        <!-- End .grid_12 -->

                    </div>
                    <!--  end content-table  -->

                </div>
                <!--  end content-table-inner ............................................END  -->
            </td>
            <td id="tbl-border-right"></td>
        </tr>
        <tr>
            <th class="sized bottomleft"></th>
            <td id="tbl-border-bottom">&nbsp;</td>
            <th class="sized bottomright"></th>
        </tr>
    </table>
    <script type="text/javascript">
        function ResetAllField() {
            document.getElementById("ContentPlaceHolder1_txtTenDonViTinh").value = "";
        }
    </script>
    <script>
        $(document).ready(function () {
            $("#li-DVT").toggleClass("sub_show");
            $("#div-SanPham").toggleClass("show");
            $("#ul-SanPham").toggleClass("current");
        });
    </script>
</asp:Content>
